#include<stdio.h>
#include<pthread.h>
#include<unistd.h>
void* mythread(void* arg)
{
    while(1)
    {
      printf("i am :%s,pid:%d\n",(char*)arg,getpid());
      sleep(1);
    }
}
int main()
{
 pthread_t tid;

  pthread_create(&tid,NULL,mythread,(void *)"mythread 1");
  while(1)
  {
    printf("i am mian thrad pid:%d\n",getpid());
    sleep(2);
  }
  return 0;
}
